package com.basic;
import com.frame.struts.BaseBean;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.frame.struts.ActionContext;
import com.utils.*;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2006</p>
 * <p>Company: </p>
 * @author not attributable
 * @version 1.0
 */

public class MarketAnalysisForm extends BaseBean{
    public MarketAnalysisForm() {
    }
	MarketAnalysisEntity mae = new MarketAnalysisEntity();
	public String addMarketAnalysis(){
		HttpServletRequest request = ActionContext.getActionContext().
			getRequest();
		HttpServletResponse response = ActionContext.getActionContext().
			getResponse();
		BasicFactory factory = new BasicFactory();
		String qyid = (String) request.getSession().getAttribute("session_qyid");
		mae.setQyid(qyid);
		try{
		if(factory.addMarketAnalysis(mae)){
				response.sendRedirect(request.getContextPath()+"basic/modifyMarketAnalysis.jsp");
		}else
		{
		response.sendRedirect(request.getContextPath()+"/failed.jsp");
		}
	}
	catch (Exception e) {

	 }

			return null;


	}
	public String modifyMarketAnalysis(){
		HttpServletRequest request = ActionContext.getActionContext().
			getRequest();
		HttpServletResponse response = ActionContext.getActionContext().
			getResponse();
		BasicFactory factory = new BasicFactory();
		String qyid = (String) request.getSession().getAttribute("session_qyid");
		mae.setQyid(qyid);
		try{
			if(factory.addMarketAnalysis(mae)){
					response.sendRedirect(request.getContextPath()+"basic/modifyMarketAnalysis.jsp");
			}else
			{
			response.sendRedirect(request.getContextPath()+"/failed.jsp");
			}
		}
		catch (Exception e) {

		 }

				return null;


	}

	public void setJzdsfx(String jzdsfx){
		mae.setJzdsfx(jzdsfx);
		//System.out.println("ksajfd:"+glzjyjcjz);
	}
	public String getJzdsfx(){
		return mae.getJzdsfx();
	}
	public void setQyid(String qyid){
		mae.setQyid(qyid);
	}
	public String getQyid(){
		return mae.getQyid();
	}

}